/*
 * @Author: 飞越疯人院 353362604@qq.com
 * @Date: 2022-09-22 09:44:20
 * @LastEditors: 飞越疯人院 353362604@qq.com
 * @LastEditTime: 2022-12-28 09:27:40
 * @FilePath: \adminstration\src\Common\Modal\ThrModalList\SampleEnclosure.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { commonTableList } from '../config'
import { BuiltInData } from '../config'
import { setValueEnumData } from '../../Router/MenuBoxList'

export const BeamProduceRecordDetail = async ({ data }) => {
    const ClientData = JSON.parse(localStorage.getItem('ClientData'))
    let dataList = {
        url: 'BeamProduceRecordDetail',
        uuid: data.uuid,
        type: '添加生产工序',
        width: 600,
        classification: 'FormModal',
        hideInSearch: true,
        pageSize: 10,
        params: {},
        added: 'posBeamProduceRecordDetail',
        additional: { beamProduceRecordUuid: data.uuid },
        columns: [
            {
                title: '工序',
                dataIndex: 'processUuid',
                search: false,
                valueEnum: ClientData.process,
                className: 'RemarkForm',
                valueType: 'select',
            },
            {
                title: '台座',
                dataIndex: 'beamSeatUuid',
                search: false,
                valueType: 'select',
                className: 'RemarkForm',
            },
            {
                title: '生产日期',
                dataIndex: 'produceDate',
                search: false,
                className: 'RemarkForm',
                valueType: 'Date',
                showTime: true,
            },
        ],
    }
    dataList.columns.find(v => v.dataIndex === 'beamSeatUuid').valueEnum = await setValueEnumData({
        url: 'getBeamSeatGetNoBeamSeats',
    })
    return dataList
}
